package com.zyc.webtest.dao;

import com.zyc.webtest.domain.SysUserEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.Optional;

/**
 * 系统用户
 * 
 * @author zyc
 * @date 2017-04-29 12:48:32
 */
@Repository
public interface SysUserRepository extends JpaRepository<SysUserEntity,Long> {

    @Query(value="select * from sys_user where user_name=:userName",nativeQuery=true )
    Optional<SysUserEntity> findUserByUserName(@Param("userName") String userName);
}
